<?php
/**
 * Created by PhpStorm.
 * User: allen
 * Date: 2019/3/8
 * Time: 12:48
 */

namespace app\index\model;

use think\Model;

class CommentLog extends Model
{
    protected $pk='id';
    /**
     * 检测
     * @param $aid
     * @param $mid
     * @param int $out
     * @return int
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function check($aid,$mid,&$out=0){
        $res = $this->where('cid','eq',$aid)
            ->where('mid','eq',$mid)
            ->find();
        $out = $res['id'];
        return $res;
    }
}